//
//  SJPBaseViewController.m
//  SWS_Project00
//
//  Created by 马继鵬 on 17/3/8.
//  Copyright © 2017年 SWS. All rights reserved.
//

#import "SJPBaseViewController.h"
#import "SJPDepatmentModel.h"
@interface SJPBaseViewController ()

@end

@implementation SJPBaseViewController




- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
   
   self.navigationItem.hidesBackButton = YES;
    UIImage* backImage = [UIImage imageNamed:@"jiantou"];
    
    UIBarButtonItem* backBar = [[UIBarButtonItem alloc]initWithImage:backImage style:UIBarButtonItemStyleDone target:self action:@selector(backToHome)];
    self.navigationItem.leftBarButtonItem = backBar;
    self.navigationController.navigationBar.barTintColor = kThemeColor;
    self.title = _model.title;
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self.navigationItem.leftBarButtonItem setTintColor:[UIColor whiteColor]];
}
- (void)backToHome
{
//    [self.navigationController popViewControllerAnimated:YES];
    [self.navigationController popToRootViewControllerAnimated:NO];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
